#include <buola/gui.h>

#include <buola/gui/cpropertyfield.h>

#include <buola/widgets/cwidgetfactories.h>
#include <buola/widgets/ctheme.h>

#include <buola/app/cinitfunction.h>

#include <buola/widgets/propertytypes.h>

namespace buola { namespace gui {

bool InitBuolaGUI()
{
    CPropertyType::RegisterType(L"string",new CStringPropertyType);
    CPropertyType::RegisterType(L"int",new CIntPropertyType);
    CPropertyType::RegisterType(L"bool",new CBoolPropertyType);
    CPropertyType::RegisterType(L"double",new CDoublePropertyType);
    CPropertyType::RegisterType(L"pointer",new CPointerPropertyType);
    CPropertyType::RegisterType(L"any",new CAnyPropertyType);
    CPropertyType::RegisterType(L"filesize",new CFileSizePropertyType);
    CPropertyType::RegisterType(L"transferspeed",new CTransferSpeedPropertyType);
    CPropertyType::RegisterType(L"uri",new CURIPropertyType);

    CWidgetFactory::Add(new CEditBoxFactory);
    CWidgetFactory::Add(new CButtonFactory);
    CWidgetFactory::Add(new CLabelBoxFactory);
    CWidgetFactory::Add(new CNumBoxFactory);
    CWidgetFactory::Add(new CCheckBoxFactory);
    CWidgetFactory::Add(new CComboBoxFactory);
    CWidgetFactory::Add(new CProgressBarFactory);
    CWidgetFactory::Add(new CScrollBarFactory);
    CWidgetFactory::Add(new CListBoxFactory);
    CWidgetFactory::Add(new COptionBoxFactory);
    CWidgetFactory::Add(new CTabBoxFactory);
    return true;
}

static CInitFunction sInitBuolaGUI(InitBuolaGUI,L"GUI widget factories",CInitFunction::PRIORITY_HIGH);

/*namespace gui*/ } /*namespace buola*/ }
